import imageio

#!/usr/bin/env python
# -*- coding:utf-8 -*-
# @FileName  :获取图片的尺寸.py
# @Time      :2024/2/29 
# @Author    :CL
# @email     :1037654919@qq.com


# 图片文件路径
image_path = '/home/chenglei3/work/python_spider/shetuwang/hippopx/fruit/background-berries-berry-blackberries-preview.jpg'
img = imageio.v2.imread(image_path)
# 获取图片尺寸
height, width, _ = img.shape
print(f"图片尺寸：{width} x {height}")
